﻿@model CC.MVC.Models.Square
@{
    ViewBag.Title = "Home Page";
}
<h2>Square</h2>
<p>
    This square is @Model.X by @Model.Y.
</p>

@*
    The code below is if we wanted this to work only for this square that
    was passed to the page this time.
*@
<p>
    The area of this square is @Model.GetArea()
</p>

@*
    Uncomment the line below to use the partial view that will work for any shape that is the model
    for the page.

    The model of this page is automatically passed the the partial that is below. Note
    that the model for the partial is specified as a Shape object and therefore will 
    work for all of our shapes.

    The partial file can be found in the ~/Views/Shared/_Area.cshtml file.  This is a shared
    folder that all views have access to.  This is why we didn't have to specify the entire path.
*@

@*
    @Html.Partial("_Area")
*@